<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta charset="utf-8" />
<title>大咖讲后台管理系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 必须的css -->
<link href="<%=basePath %>bigshot/css/bootstrap.min.css" rel="stylesheet" />
<link href="<%=basePath %>bigshot/css/bootstrap-responsive.min.css" rel="stylesheet" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/font-awesome.min.css" />
<!--[if IE 7]>
<link rel="stylesheet" href="/Public/Admin/<%=basePath %>bigshot/css/font-awesome-ie7.min.css" />
<![endif]-->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-fonts.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/jquery-ui-1.10.3.full.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-responsive.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-skins.min.css" />
<!--[if lte IE 8]>
	<link rel="stylesheet" href="/Public/Admin/<%=basePath %>bigshot/css/ace-ie.min.css" />
<![endif]-->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/bootstrap-timepicker.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/datepicker.css" />

<!-- lagou.alert -->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/lagou.admin.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/lagou.global.css" />

<!-- webuploader -->
<link rel="stylesheet" type="text/css" href="<%=basePath %>bigshot/css/webuploader.css">
<link rel="stylesheet" type="text/css" href="<%=basePath %>bigshot/css/lxlin.css">
<link rel="stylesheet" type="text/css" href="<%=basePath %>bigshot/css/lq.datetimepick.css"/>
<!-- /必须的css -->
<script src="<%=basePath %>bigshot/js/time/time_jquery.js"></script>
<script src="<%=basePath %>bigshot/js/ace-extra.min.js"></script>
<script src="<%=basePath %>bigshot/js/lxlin.js"></script>
</head>
<body>
<!-- 头部 -->
		<div class="navbar" id="navbar">
	<div class="navbar-inner">
		<div class="container-fluid">
			<a href="<%=basePath %>redirect/index.do" class="brand">
				<small class="logo">中国领先的高端商务在线语音分享社区</small>
			</a><!--/.brand-->

		<%@include file="top.jsp"%>
		</div><!--/.container-fluid-->
	</div><!--/.navbar-inner-->
</div>
<!-- /头部 -->
		<div class="main-container container-fluid">
			<a class="menu-toggler" id="menu-toggler" href="#">
				<span class="menu-text"></span>
			</a>
			<!-- 左侧菜单 -->
			
		<div class="sidebar" id="sidebar">
	<%@include file="left.jsp"%>
<div class="sidebar-collapse" id="sidebar-collapse">
	<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
</div>
<script type="text/javascript">
	try{ace.settings.check('sidebar','collapsed')}catch(e){}
</script>
</div>

			<!-- /左侧菜单 -->
			<div class="main-content">
				<!-- 面包屑导航 -->
				<div class="breadcrumbs" id="breadcrumbs">
					<ul class="breadcrumb">
						<li>
							<i class="icon-home home-icon"></i>
								<a href="<%=basePath %>redirectindex.do">首页</a>
							<span class="divider">
							<i class="icon-angle-right arrow-icon"></i>
							</span>
						</li>
						<li class="active">我的产品>编辑产品</li>

					</ul>
				</div>
				<!-- /面包屑导航 -->
				<div class="page-content">
					<div class="row-fluid">
							<div class="table-header" style="padding-left: 35px;">创建产品 </div>
							<div class="row" style="width:900px;margin-left:35px;margin-top:20px;position:relative;">
								<div class="col-xs-12">
									<form id="Factory" method="post" onsubmit="return CheckPorduct(this)">
										<div class="channel_editor">
												<font class="LabelTitle alignment">产品封面：</font>
												<img name="img0" src="" id="img0" >
												<input type="file" name="file0" id="file0" multiple="multiple" />
										</div>
										<script>	
												$("#file0").change(function(){
													var objUrl = getObjectURL(this.files[0]) ;
													console.log("objUrl = "+objUrl) ;
													if (objUrl) {
														$("#img0").attr("src", objUrl) ;
													}
												}) ;
												//建立一個可存取到該file的url
												function getObjectURL(file) {
													var url = null ; 
													if (window.createObjectURL!=undefined) { // basic
														url = window.createObjectURL(file) ;
													} else if (window.URL!=undefined) { // mozilla(firefox)
														url = window.URL.createObjectURL(file) ;
													} else if (window.webkitURL!=undefined) { // webkit or chrome
														url = window.webkitURL.createObjectURL(file) ;
													}
													return url ;
												}
										</script>
										<div class="form-group mt10 "style="margin-bottom: 10px;">
											<span >
												<font class="LabelTitle alignment">产品属性：</font>
												<label style="display: inline;margin-right: 20px;"><input name="channel_attribute" type="radio" value="公开" checked="" />公开</label>
												<label style="display: inline;"><input name="channel_attribute" type="radio" value="收费"  />收费</label>
											</span>
										</div>
										<div class="form-group mt10 ">
											<span>
												<font class="LabelTitle alignment">产品类型：</font>
												<select name="cid" onchange="change_producttype(this.value)" >
													<option value="计时产品">计时产品</option>
													<option value="计次产品">计次产品</option>
													<option value="打包产品">打包产品</option>
												</select>
											</span>
										</div>
										<div class="form-group mt10">
											<div class="w400">
												<label>
													<font class="LabelTitle alignment">产品名称：</font>
													<input type="text" name="productname" placeholder="请输入产品名称，最长不超过20个字符..." style="font-size: 10px;width: 400px;" onblur="if(this.value.length>20){alert('您输入的长度过长，请重新输入！');value='';} " />
												</label>
												<label>
													<span><font class="LabelTitle create_lectureTitle alignment">产品标签：</font>
													<div class="lecture_label1" id="edit_xingge" name="lecture_label1">
														<label><input id="xingge_1" name="lecture_label1" type="checkbox" value="投融类" onClick="check_count('xingge', this, 3)">投融类</label>
														<label><input id="xingge_2" name="lecture_label1" type="checkbox" value="职业类" onClick="check_count('xingge', this, 3)">职业类</label>
														<label><input id="xingge_3" name="lecture_label1" type="checkbox" value="商业银行类" onClick="check_count('xingge', this, 3)">商业银行类</label>
														<label><input id="xingge_4" name="lecture_label1" type="checkbox" value="税务类" onClick="check_count('xingge', this, 3)">税务类</label>
														<label><input id="xingge_5" name="lecture_label1" type="checkbox" value="审计类" onClick="check_count('xingge', this, 3)">审计类</label>
														<label><input id="xingge_6" name="lecture_label1" type="checkbox" value="信托类" onClick="check_count('xingge', this, 3)">信托类</label>
														
														<label><input id="xingge_6" type="checkbox" value="新三板" onClick="check_count('xingge', this, 3)">新三板</label>
														<label><input id="xingge_6" type="checkbox" value="IPO" onClick="check_count('xingge', this, 3)" >IPO</label>
													</div>
												</label>
												<label class="LabelTitle alignment">产品描述：
													<textarea class="autosize-transition form-control" id="" name="product_description" required="required" rows="10" style="vertical-align:top;margin-left: -5px;width: 400px;"></textarea>
												</label>
												
												<div id="timeproduct" style="display: block;">
													<label>
														<font class="LabelTitle create_lectureTitle">收听有效期：</font>
														<select name="timeproduct_validityperiod" id="" style="width: 55px;">
															<option value="1" selected="">1</option>
															<option value="2">2</option>
															<option value="3">3</option>
															<option value="4">4</option>
															<option value="5">5</option>
															<option value="6">6</option>
															<option value="7">7</option>
															<option value="8">8</option>
															<option value="9">9</option>
															<option value="10">10</option>
															<option value="11">11</option>
															<option value="12">12</option>
														</select>
														<font class="LabelTitle">个月<span style="font-size: 10px;margin-left: 10px;">(购买该产品的用户在该周期内可无限制收听本产品下的所有讲座)</span></font>
													</label>
												</div>
												<div id="countproduct" style="display: none;">
													<label class="LabelTitle alignment2">总收听次数：
														<input type="text" name="countproduct_frequency" placeholder="最多输入3位数..."  style="width: 100px;text-align: right;" onblur=" if(isNaN(this.value)){alert('请输入数字！');value=''}"/>次
													</label>
													<label>
														<font class="LabelTitle create_lectureTitle">收听有效期：</font>
														<select name="" id="" style="width: 55px;">
															<option value="1" selected="">1</option>
															<option value="2">2</option>
															<option value="3">3</option>
															<option value="4">4</option>
															<option value="5">5</option>
															<option value="6">6</option>
															<option value="7">7</option>
															<option value="8">8</option>
															<option value="9">9</option>
															<option value="10">10</option>
															<option value="11">11</option>
															<option value="12">12</option>
														</select>
														<font class="LabelTitle">个月<span style="font-size: 10px;margin-left: 10px; ">(购买该产品的用户须在该期限内用完本产品所有收听次数，过期不可继续使用)</span></font>
													</label>
												</div>
												<div id="packproduct" style="display: none;">
													<label>
														<font class="LabelTitle create_lectureTitle">收听有效期：</font>
														<select name="" id="" style="width: 55px;">
															<option value="1">1</option>
															<option value="2">2</option>
															<option value="3">3</option>
															<option value="4">4</option>
															<option value="5">5</option>
															<option value="6">6</option>
															<option value="7">7</option>
															<option value="8">8</option>
															<option value="9">9</option>
															<option value="10">10</option>
															<option value="11">11</option>
															<option value="12" selected="">12</option>
														</select>
														<font class="LabelTitle">个月<span style="font-size: 10px;margin-left: 10px; ">(购买该产品的用户有权在该期限内不限次数收听本产品下的所有讲座)</span></font>
													</label>
												</div>
												<input type="button" style="margin-top:5px;margin-bottom:15px;border-radius:5px;" name="addlecture" onclick="add_lecture()" class="btn btn-lg btn-success" value="添加讲座到该产品	" />
<!-- 添加讲座到产品div弹出层 开始 -->
<div class="add_lecture_to_product_content"  id="light">
	
	<div class="add_lecture_to_product">
		<img class="return_img" src="<%=basePath %>bigshot/images/return.png" onclick="return_lecture()" />
		<div class="table-header excel">添加讲座到该产品
			<input type="text" name="keywords" id="productID" value=""  placeholder="请输入讲座ID或名称..." required="required" style=";margin-top: 5px!important;margin-bottom: 5px!important;" />
			<button type="button" class="btn btn-primary btn-small" onclick="search_product()"><i class="icon-search bigger-110" ></i>搜索</button>
			<button type="button" class="btn btn-primary btn-small" onclick="product_btn_add()"><i class="icon-ok bigger-110" ></i>添加</button>
			<button type="button" class="btn btn-primary btn-small" onclick=""><i class="icon-save bigger-110" ></i>保存</button>
			<button type="button" class="btn btn-primary btn-small" onclick="product_btn_delete()"><i class="icon-remove bigger-110" ></i>移除</button>
			
		</div>
		<font>已添加的讲座列表：</font>
		<div class="channel_all_lecture">
			
			<table  class="table table-striped table-bordered table-hover" id="lecture_add">
				<thead>
					<tr>
						<th class="center"><label><span onclick="selectAll1()">全选</span></label></th>
						<th class="center">讲座ID</th>
						<th class="hidden-phone center">讲座名称</th>
						<th class="center">讲座类型</th>
						<th class="center">直播时间</th>
						<th class="center">讲座大咖</th>
					</tr>
				</thead>
				<tbody>
					<!-- <tr>
						<td class="center"><input name='aaa1' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa1' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa1' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa1' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa1' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr> -->
				</tbody>
			</table>
		</div>
		<font>频道下所有讲座列表：</font>
		<div class="channel_all_lecture">
			<table  class="table table-striped table-bordered table-hover" id="lecture_all">
				<thead>
					<tr>
						<th class="center"><label><span onclick="selectAll()">全选</span></label></th>
						<th class="center">讲座ID</th>
						<th class="hidden-phone center">讲座名称</th>
						<th class="center">讲座类型</th>
						<th class="center">直播时间</th>
						<th class="center">讲座大咖</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="center"><input name='aaa' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
					<tr>
						<td class="center"><input name='aaa' type="checkbox" value="1"></input></td>
						<td class="center">120</td>
						<td class="center">讲座名称2</td>
						<td class="center">
								<span class="label arrowed label-primary"><input type="button" id="state" value="直播" style="border: none;background-color: #2283c5;font-size: 12px;line-height: 12px;color: #fff;" /></span>
						</td>
						<td class="center">2016-3-2 22:00</td>
						<td class="center">大咖姓名1</td>								
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
<!-- 添加讲座到产品div弹出层 结束 -->
												<label>
													<font class="LabelTitle alignment">产品价格：</font>
													<input type="text" name="product_price" placeholder="最多输入六位数..." onblur=" if(isNaN(this.value)){alert('请输入正确的价格！');value=''}if(this.value.length>6){alert('售卖价格最大输入六位数，请重新输入');value=''}" style="width: 110px; text-align:right" />元
												</label>
												<label class="LabelTitle alignment3">
													<font class="LabelTitle alignment">产品状态：</font>

														<label style="display: inline;"><input name="state" type="radio" value="开放" checked=""  />开放</label>
														<label style="display: inline;margin-left: 15px;"><input name="state" type="radio" value="停售"  />停售</label>
														<label style="display: inline;margin-left: 15px;"><input name="state" type="radio" value="关闭"  />关闭</label>
												</label>
											</div>
										</div>
										<input type="button" style="margin-top:10px;border-radius:5px;" onclick="return CheckPorduct(this.form)" class="btn btn-lg btn-success" value="创建产品" />
										<input type="reset" style="margin-top:10px;margin-left: 40px;border-radius:5px" onclick="reset_product()" class="btn btn-lg btn-reset" value="重置" />
									</fo rm>
									<script src="<%=basePath %>bigshot/js/time/time_selectUi.js"></script>
									<script src="<%=basePath %>bigshot/js/time/time_lq.datetimepick.js"></script>			
				</div><!--/.page-content-->

				<!-- 右侧悬浮的设置按钮,去掉好像会引起js报错 -->
				<div class="ace-settings-container hide" id="ace-settings-container">
					<div class="btn btn-app btn-mini btn-warning ace-settings-btn" id="ace-settings-btn">
						<i class="icon-cog bigger-150"></i>
					</div>

					<div class="ace-settings-box" id="ace-settings-box">
						<div>
							<div class="pull-left">
								<select id="skin-colorpicker" class="hide">
									<option data-skin="default" value="#438EB9">#438EB9</option>
									<option data-skin="skin-1" value="#222A2D">#222A2D</option>
									<option data-skin="skin-2" value="#C6487E">#C6487E</option>
									<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
								</select>
							</div>
							<span>&nbsp; Choose Skin</span>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar" />
							<label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar" />
							<label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs" />
							<label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl" />
							<label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
						</div>
					</div>
				</div>
				<!-- /右侧悬浮的设置按钮,去掉好像会引起js报错 -->
			</div>
		</div>

<!-- 回到顶部 -->
<a href="###" id="btn-scroll-up" class="btn-scroll-up btn btn-small btn-inverse">
	<i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
<!-- /回到顶部 -->

<!-- 操作后提示框 -->
<div id="lg-alert" class="hide" style="margin-bottom:-1.5em;"></div>

<!--modal表单弹出框-->
<form id="lg-form" class="modal fade hide form-horizontal" method="post" tabindex="-1" enctype="multipart/form-data" onSubmit="return false;"></form>

<!-- 模态框(Modal) -->
<div class="modal fade" id="Modal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
	
</div><!-- /.modal -->
		
<!-- 基础js部分 -->

<script src='<%=basePath %>bigshot/js/jquery.mobile.custom.min.js'></script>

<script src="<%=basePath %>bigshot/js/jquery-ui-1.10.3.full.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.ui.touch-punch.min.js"></script>
<script src="<%=basePath %>bigshot/js/bootstrap.min.js"></script>
<script src="<%=basePath %>bigshot/js/ace-elements.min.js"></script>
<script src="<%=basePath %>bigshot/js/ace.min.js"></script>

<script src="<%=basePath %>bigshot/js/jquery.dataTables.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.dataTables.bootstrap.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.inputlimiter.1.3.1.min.js"></script>

<!-- ueditor -->
<script type="text/javascript" src="<%=basePath %>bigshot/js/ueditor.config.js"></script>
<script type="text/javascript" src="<%=basePath %>bigshot/js/ueditor.all.js"></script>

<!-- webuploader -->
<script type="text/javascript" src="<%=basePath %>bigshot/js/webuploader.js"></script>

<!-- lagoualert -->
<script src="<%=basePath %>bigshot/js/lagou/lagou.global.js"></script>

<!-- common.lib库 -->
<script src="<%=basePath %>bigshot/js/conmon/common.lib.js"></script>

<!-- /基础js部分 -->
<script>
   $(function (){$('#myModal').modal({
      keyboard: true
   })});
</script>
<script type="text/javascript">
jQuery(function($){
	try{
		ace.settings.navbar_fixed(true);
		ace.settings.sidebar_fixed(true);
		ace.settings.breadcrumbs_fixed(true);
	}
	catch(e){}
	$('[data-rel=tooltip]').tooltip();
	$('[data-rel=popover]').popover({html:true});
});	
</script>


<script src="<%=basePath %>bigshot/js/jquery.easy-pie-chart.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.slimscroll.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.sparkline.min.js"></script>
<script src="<%=basePath %>bigshot/js/flot/jquery.flot.min.js"></script>
<script src="<%=basePath %>bigshot/js/flot/jquery.flot.pie.min.js"></script>
<script src="<%=basePath %>bigshot/js/flot/jquery.flot.resize.min.js"></script>


</body>
</html>